package decorator;/** * Created by Administrator on 2018-10-20. */public class Whip extends CondimentDecorator {     Beverage beverage;//要让Whip能够引用一个Beverage,用一个实例变量记录饮料，也就是被装饰者    public  Whip(Beverage beverage){        this.beverage = beverage;    }    public String getDescription() {        return beverage.getDescription() +" Whip";    }    public double cost() {        return .18 + beverage.cost();    }}